file(GLOB_RECURSE HEARD ./*.h)
file(GLOB_RECURSE SOURCE ./*.cpp)
file(GLOB_RECURSE MetricsHead ./MetricsCompute/*.h)
file(GLOB_RECURSE MetricsSrc ./MetricsCompute/*.cpp)

include_directories(../Base ../TradeBase ta-lib MetricsCompute)

source_group("Header Files" FILES ${HEARD} ${MetricsHead})
source_group("Source Files" FILES ${SOURCE} ${MetricsSrc})

ADD_DEFINITIONS(-DSTRATEGYBASE_LIB)
#共享DLL中使用 MFC  
#ADD_DEFINITIONS(-D_AFXDLL)  
#SET(CMAKE_MFC_FLAG 2) #设置CMAKE_MFC_FLAG为2,0表示使用标准的MFC，1表示静态MFC,2表示共享  
ADD_LIBRARY(StrategyBase SHARED ${HEARD} ${SOURCE})


if (MSVC)
	TARGET_LINK_LIBRARIES(StrategyBase BaseTool Qt5::Core
						ta_common_cmr.lib
						ta_libc_cmr.lib
                        ta_abstract_cmr.lib
                        ta_func_cmr.lib)
ELSE()
	target_link_libraries(StrategyBase BaseTool Qt5::Core
                        libta_common_cmr.a
                        libta_libc_cmr.a
                        libta_abstract_cmr.a
                        libta_func_cmr.a)
endif ()